﻿<div class="all-elements">
    <div id="sidebar" class="page-sidebar">
        <div class="page-sidebar-scroll">
            <div class="nav-item selected-nav-item" data-ng-repeat="r in roleByGroup">
                <a href="#/{{r.RoleValue}}">
                    <div class="icon-nav {{r.RoleValue}}"></div>
                    {{r.RoleName}}
                </a>
            </div>
            <div class="nav-item">
                <a href="#">
                    <div class="icon-nav icon-share" onclick="logout()"></div>
                    THOÁT
                </a>
                <script>
                    function logout() {
                        localStorage.removeItem("idkey");
                        localStorage.removeItem("authen");
                        localStorage.removeItem("menu");
                        $location.path('/login/');
                    }
                </script>
            </div>
        </div>
    </div>



    <div id="content" class="page-content">

        <div class="page-header">
            <p class="logo">
            </p>

            <a href="javascript:void(0)" class="deploy-sidebar"></a>
            <div class="user">
                <span class="name">{{userName}}</span>
                <div class="notifi">
                    <span class="noti-chart" ng-show="countNewMessage>0"><a href="#/newMessage">{{countNewMessage}}</a></span>
                    <span class="noti-friend" ng-show="countAddFriend>0"><a href="#/newFriend">{{countAddFriend}}</a></span>
                    <span class="noti-fromroom" ng-show="countFromRoom>0"><a href="#/newFromRoom">{{countFromRoom}}</a></span>
                </div>
            </div>
        </div>

        <div class="page-content-wrapper">
            <div class="container no-bottom">
                <div class="heading">
                    <!--<div class="heading-left">
                            <span class="mid-icon icon-circle-arrow-right-min"></span>
                        </div>-->
                    <div class="heading-left">
                        <h3>danh sách phòng học</h3>
                    </div>

                </div>
            </div>
            <div>
                <span ng-show="!hasMyRoom" class="float-left" ng-click="showRoomTaskClick()">
                    <span class="icon-add-1 icon-inline float-left"></span><span class="float-left">Tạo phòng</span>
                </span>
                <form ng-show="roomTask" name="myForm" class="full form">
                    <label for="name">Biệt danh</label>
                    <input type="text" id="name" name="name" ng-model="formData.Name" ng-maxlength="30" required />
                    <span ng-show="myForm.name.$error.required && myForm.name.$dirty">Trường bắt buộc</span>
                    <span ng-show="!myForm.name.$error.required && myForm.name.$error.maxlength && myForm.name.$dirty">Không được nhập quá 30 ký tự</span>
                    <br />
                    <label for="fullname">Tên đầy đủ</label>
                    <input type="text" id="fullname" name="fullname" ng-model="formData.FullName" ng-maxlength="50" required />
                    <span ng-show="myForm.fullname.$error.required && myForm.fullname.$dirty">Trường bắt buộc</span>
                    <span ng-show="!myForm.fullname.$error.required && myForm.fullname.$error.maxlength && myForm.fullname.$dirty">Không được nhập quá 50 ký tự</span>
                    <br />
                    <label for="description">Mô tả cho phòng</label>
                    <textarea ng-model="formData.Description" />
                    <button type="submit" ng-disabled="!myForm.$valid" ng-click="createRoom()">Tạo phòng</button>
                </form>
            </div>
            <div class="adhere-room">
                <input id="joinRoomInput" type="number" placeholder="Nhập id phòng" /><input type='submit' ng-click="joinRoom()" value='Tham gia' />
            </div>

            <div class="container">
                <div class="blog-post">
                    <div class="post-content">
                        <div id="listRoom" class="list-room">
                            <div class="room" data-ng-repeat="r in roomByUser" ng-class="{myroom: r.Master==true}">
                                <a href="#/lesson/{{r.RoomId}}/{{r.CurrentLesson}}">
                                    <div class="room-number">{{r.RoomId}}</div>
                                    <div class="room-name">{{r.RoomName}}</div>
                                </a>
                            </div>
                        </div>
                    </div>
                    <div class="decoration"></div>
                    <div class="adhere-room">
                        <input id="searchRoomInput" type="text" placeholder="Nhập thông tin phòng" /><input type='submit' ng-click="search()" value='tìm' />

                    </div>
                    <div class="post-content">
                        <div id="listsearch" class="list-room">
                            <div class="room" data-ng-repeat="rs in searchRoomList">
                                <a href="#/lesson/{{rs.Id}}/{{rs.CurrentLesson}}">
                                    <div class="room-number">{{rs.Id}}</div>
                                    <div class="room-name">{{rs.Name}}</div>
                                </a>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <!--<div class="footer">
            <div class="footer-shortcuts">
                <a href="#"><span class="icon icon-facebook"></span></a>
                <a href="#" class="go-up"><span class="icon icon-arrow-up"></span></a>
                <a href="#"><span class="icon icon-twitter2"></span></a>
            </div>
        </div>-->
    </div>

</div>





























